package io.kiki.sba.registry.server.clientInterface.remoting.console.handler;

import io.kiki.sba.registry.common.model.Node;
import io.kiki.sba.registry.server.clientInterface.bootstrap.ExecutorManager;
import io.kiki.sba.registry.server.shared.remoting.AbstractServerHandler;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.concurrent.Executor;

public abstract class AbstractConsoleHandler<T> extends AbstractServerHandler<T> {
    @Autowired
    protected ExecutorManager executorManager;

    @Override
    public Executor getExecutor() {
        return executorManager.getConsoleExecutor();
    }

    @Override
    protected Node.NodeType getConnectNodeType() {
        return Node.NodeType.console;
    }
}
